package com.autumn.sms.service;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

import com.autumn.config.client.annotation.EnableAutumnCloudConfigTraceClient;
import com.autumn.log.client.EnableAutumnLoggingClient;
import com.autumn.mq.rabbit.annotation.AutumnRabbitConnection;
import com.autumn.mq.rabbit.annotation.EnableAutumnRabbit;
import com.autumn.mybatis.annotation.EnableAutumnMybatis;
import com.autumn.spring.boot.properties.PropertiesConstant;
import com.autumn.swagger.EnableAutumnSwagger;
import com.autumn.web.EnableAutumnApiResponseBody;
import com.autumn.web.security.AbstractAutumnSecurityApplication;

import io.swagger.annotations.Api;

/**
 * 短信应用
 * 
 * @author 老码农
 *
 *         2018-01-12 09:25:02
 */
@ComponentScan({ "com.autumn.sms.service" })
@EnableAutumnSwagger(value = { "com.autumn.sms.service.controller" }, title = "autumn-sms-api")
@EnableAutumnRabbit(value = { @AutumnRabbitConnection(eventDataPackages = { "com.autumn.sms" }, eventHandlerPackages = {
		"com.autumn.sms.service.mq" }, propertiesPrefix = PropertiesConstant.AUTUMN_MESSAGE_RABBIT_MQ_PROPERTIES_PREFIX) })
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@EnableAutumnMybatis(typeAliasesPackages = { "com.autumn.sms.service.entities" }, value = {
		"com.autumn.sms.service.repositories" }, mapperLocations = { "classpath:mapper/*Mapper.xml" })
@EnableEurekaClient
@EnableFeignClients
//@EnableAutumnConfigClient
@EnableAutumnCloudConfigTraceClient
@EnableAutumnLoggingClient
@EnableAutumnApiResponseBody(apiControllerPackages = { "com.autumn.sms.service.controller" })
@Api(tags = "短信服务")
public class SmsServiceApplication extends AbstractAutumnSecurityApplication {

	public static void main(String[] args) {
		run(SmsServiceApplication.class, args);
	}
}
